<!DOCTYPE html >
<html>
<head>
    <link rel="stylesheet" href="demos.css" type="text/css" media="screen" />
    
    <script src="../libraries/RGraph.common.core.js" ></script>
    <script src="../libraries/RGraph.common.dynamic.js" ></script>
    <script src="../libraries/RGraph.common.tooltips.js" ></script>
    <script src="../libraries/RGraph.line.js" ></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <!--[if lt IE 9]><script src="../excanvas/excanvas.js"></script><![endif]-->
    
    <title>A Line chart that looks like Google Analytics</title>
    
    <meta name="description" content="A Line chart that has been configured to look like Google Analytics" />
     
</head>
<body>

    <h1>A Line chart that looks like Google Analytics</h1>

    <canvas id="cvs" width="600" height="250">[No canvas support]</canvas>
    
    <script>
        $(document).ready(function ()
        {
            var data     = [1056,1200,952,868,846,911,944,955,935,1132,1500,1666,1485,0,0,0,0,0,0,0,0,0,0,0,0];
            var tooltips = [];
            
            // Create the tooltips
            for (var i=0; i<data.length; i+=1) {
                tooltips[i] = 'Pageviews: ' + String(data[i])
            }

            var line = new RGraph.Line({
                id: 'cvs',
                data: data,
                options: {
                    tooltips: {
                        self: tooltips,
                        highlight: false
                    },
                    colors: ['#058DC7'],
                    filled: true,
                    fillstyle: 'rgba(229,243,249,0.5)',
                    tickmarks: 'filledcircle',
                    background: {
                        grid: {
                            vlines: false,
                            border: false,
                            autofit: {
                                numhlines: 2
                            }
                        }
                    },
                    shadow: false,
                    linewidth: 4,
                    gutter: {
                        left: 50,
                        right: 20
                    },
                    numxticks: 3,
                    ylabels: {
                        count: 2
                    },
                    axis: {
                        color: '#aaa'
                    },
                    text: {
                        color: '#aaa'
                    },
                    labels: ['00:00','04:00','08:00','12:00','16:00','20:00','00:00']
                }
            })
            
            RGraph.ISOLD ? line.draw() : line.trace2();
            
        })
    </script>

    <p>
        <a href="./">&laquo; Back</a>
    </p>

</body>
</html>